class="col-md-6"{include file="common/top"}
<div id="page-wrapper">
    <div id="page-inner">
        <div class="row">
            <div class="col-md-12">
                <h1 class="page-head-line">产品列表</h1>
                <h1 class="page-subhead-line"></h1>

            </div>
        </div>
        <!-- /. ROW  -->

        <div class="row">
            <div class="col-md-6" style="width: 100%">
                <!--   Kitchen Sink -->
                <div class="panel panel-default">
                    <div class="panel-heading">
                        产品列表信息<a href="/admin/symbol/add">添加</a>
                    </div>
                    <div class="panel-body">
                        <div class="table-responsive">
                            <form action="/admin/symbol/index" method="get">
                                <select name="cate_id"><option value="" >请选择分类名称</option>{volist name = "symbol_cat" id = "sc"}<option value="{$sc.id}" {if $sou.cate_id==$sc.id}selected{/if}>{$sc.title}</option>{/volist}</select>
                                <input type="text" placeholder="请输入要查询的产品名称" value="{$sou.name}" name="name">
                                <select name="on_sale"><option value="">上架状态</option><option value="on" {if $sou.on_sale=="on"}selected{/if}>上架</option><option value="off" {if $sou.on_sale=="off"}selected{/if}>下架</option></select>
                                <select name="recommend"><option value="">是否推荐</option><option value="是" {if $sou.recommend=="是"}selected{/if}>是</option><option value="否" {if $sou.recommend=="否"}selected{/if}>否</option></select>
                                <input type="submit" value="搜索" name="sousuo">
                            </form>
                            <table class="table table-striped table-bordered table-hover">
                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>分类名称</th>
                                    <th>产品名称</th>
                                    <th>上架状态</th>
                                    <th>过夜费</th>
                                    <th>手续费</th>
                                    <th>保证金</th>
                                    <th>最大止盈</th>
                                    <th>最大止损</th>
                                    <th>是否推荐</th>
                                    <th>创建时间</th>
                                    <th>更新时间</th>
                                    <th>最后收取时间</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {volist name="arr" id="vo"}
                                <tr>
                                    <td>{$vo.id}</td>
                                    <td> {$vo.title}</td>
                                    <td> {$vo.name}</td>
                                    <td> {if $vo.on_sale=="on"}上架{/if}{if $vo.on_sale=="off"}下架{/if}</td>
                                    <td>{$vo.overfee}</td>
                                    <td>{$vo.servicefee}</td>
                                    <td>{$vo.deposit}</td>
                                    <td>{$vo.maxrise}</td>
                                    <td>{$vo.maxlost}</td>
                                    <td>{if $vo.recommend=="1"}是{/if}{if $vo.recommend=="0"}否{/if}</td>
                                    <td>{$vo.created_at|date="Y-m-d H:i:s"}</td>
                                    <td>{$vo.updated_at|date="Y-m-d H:i:s"}</td>
                                    <td>{$vo.date}</td>
                                    <td>
                                        <div class="button-group">
                                            <a class="button border-red" href="/admin/symbol/update?id={$vo.id}" onclick=" "><span
                                                    class="icon-trash-o"></span> 修改</a>
                                            <a class="button border-red" href="javascript:;" onclick="del({$vo.id})"><span
                                                    class="icon-trash-o"></span> 删除</a>
                                        </div>
                                    </td>
                                </tr>
                                {/volist}
                                <tr>
                                    <td colspan="20">
                                        <div class="pagelist">{$arr->render()|raw}</div>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <!-- End  Kitchen Sink -->
            </div>
        </div>

    </div>
    <!-- /. PAGE INNER  -->
</div>
<script type="text/javascript">
    function del(id) {
        layer.confirm('你确定要删除吗', function () {
            $.ajax({
                type: 'delete',
                url: '/admin/symbol/del?id=' + id,
                datetype: 'json',
                success: function (data) {
                    if (data.status == 'success') {
                        layer.msg(data.msg), {icon: 1};
                    } else {
                        layer.mag(data.msg), {icon: 2};
                    }
                    location.href = '/admin/symbol/index';
                }
            })
        })
    }
</script>
{include file="common/out"}